]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Export captureScreenshot() function
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 30 Aug 2023 15:25:30 +0000 (17:25 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 31 Aug 2023 09:35:42 +0000 (09:35 +0000)
It is needed by the corresponding item in the window menu.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6967

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2928>

js/ui/screenshot.js

index b13be7b6bc0412d5ace3e512034a8a121ea4391c..d3c28a26b69883f98bb6c3b39818f71a375ba3f1 100644 (file)
@@ -2246,7 +2246,7 @@ function _storeScreenshot(bytes, pixbuf) {
  * @param {number} cursor.y - The cursor y coordinate.
  * @param {number} cursor.scale - The cursor texture scale.
  */
-async function captureScreenshot(texture, geometry, scale, cursor) {
+export async function captureScreenshot(texture, geometry, scale, cursor) {
     const stream = Gio.MemoryOutputStream.new_resizable();
     const [x, y, w, h] = geometry ?? [0, 0, -1, -1];
     if (cursor === null)